from selenium.webdriver.common.by import By
from base.base_page import BasePage


class LoginPage(BasePage):
    def __init__(self):
        super().__init__()
        self.username_loc = (By.ID, "username")
        self.pwd_loc = (By.ID, "password")
        self.verify_loc = (By.ID, "verify_code")
        self.login_btn_loc = (By.NAME, "sbtbutton")

    def login(self, username, pwd, verify):
        self.input_content(self.username_loc, username)
        self.input_content(self.pwd_loc, pwd)
        self.input_content(self.verify_loc, verify)
        self.click_el(self.login_btn_loc)


